import 'dart:io';

import 'package:simulator/core/simulator.dart';
import 'package:simulator/utils/log.dart';

Future<void> main(List<String> args) {
  int status;
  LogPrint.logInfo('start simulator with args:$args');
  Simulator.getInstance().init(args);
  while ((status = Simulator.getInstance().mainLoopShouldExit()) == 0) {
    Simulator.getInstance().mainLoopWait(false);
  }
  Simulator.getInstance().cleanup();

  exit(status);
}
